package com.hoshiicloud.mallshop.feign.hystrix;

import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.mallshop.feign.ShopAuthFeignService;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;

/**
 * @author qry
 * @date 2019/9/12 11:52
 */
@Slf4j
public class ShopAuthFeignServiceFallback  implements FallbackFactory<ShopAuthFeignService> {
    @Override
    public ShopAuthFeignService create(Throwable throwable) {
        return new ShopAuthFeignService(){
            @Override
            public Response mallShopLogin(String userName, String password, String userType, Long storeId) {
                return Response.failed("等待失败"+throwable.getMessage());
            }
        };
    }
}
